<template>
	<saleNearly ref="saleNearly" />
</template>

<script>
import saleNearly from '@/components/saleNearly.vue';
import { listBySale } from '@/api/home.js';
export default {
	name: 'Right1HomeSale',
	components: {
		saleNearly
	},
	data() {
		return {
			query: {
				year: parseInt(new Date().getFullYear()),
				categoryId: null //1-香榧 2-笋竹 3-山黄精
			},			
		};
	},
	mounted() {
		this.loadData();
	},

	methods: {
		loadData() {
			listBySale(this.query).then(result => {
				console.log('listBySale Result = ', result);
				let listSale = result.data;
				this.$refs.saleNearly.initListData(listSale)
			});
		}
	}
};
</script>
<style lang="scss" scoped></style>
